/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.jomijushi.fid.dominio;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author miguel
 */
@Embeddable
public class FidPedidoGeneraComprobanteVentaPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "fid_pedido_venta_id")
    private int fidPedidoVentaId;
    @Basic(optional = false)
    @Column(name = "fid_comprobante_venta_id")
    private int fidComprobanteVentaId;

    public FidPedidoGeneraComprobanteVentaPK() {
    }

    public FidPedidoGeneraComprobanteVentaPK(int fidPedidoVentaId, int fidComprobanteVentaId) {
        this.fidPedidoVentaId = fidPedidoVentaId;
        this.fidComprobanteVentaId = fidComprobanteVentaId;
    }

    public int getFidPedidoVentaId() {
        return fidPedidoVentaId;
    }

    public void setFidPedidoVentaId(int fidPedidoVentaId) {
        this.fidPedidoVentaId = fidPedidoVentaId;
    }

    public int getFidComprobanteVentaId() {
        return fidComprobanteVentaId;
    }

    public void setFidComprobanteVentaId(int fidComprobanteVentaId) {
        this.fidComprobanteVentaId = fidComprobanteVentaId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) fidPedidoVentaId;
        hash += (int) fidComprobanteVentaId;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof FidPedidoGeneraComprobanteVentaPK)) {
            return false;
        }
        FidPedidoGeneraComprobanteVentaPK other = (FidPedidoGeneraComprobanteVentaPK) object;
        if (this.fidPedidoVentaId != other.fidPedidoVentaId) {
            return false;
        }
        if (this.fidComprobanteVentaId != other.fidComprobanteVentaId) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.jomijushi.fid.dominio.FidPedidoGeneraComprobanteVentaPK[fidPedidoVentaId=" + fidPedidoVentaId + ", fidComprobanteVentaId=" + fidComprobanteVentaId + "]";
    }

}
